<template>
	<view class="container">
		<view class="header">
			<view class="henxian">
			</view>
			<view class="header-m u-row-between">
				<view class="u-flex u-row-center">
					<view class="f-logo" :style="{ backgroundImage: 'url(' +  user.imgUrl + ')' }">
						<image :src="logoMask" mode="aspectFill"></image>
					</view>
					<view class="u-m-l-24">
						<view class="xm">
							<text class="mz">{{user.name}}</text>
							<!-- <text class="fbh">发布号</text>
							<image class="fbhtp" src="../../static/homepage/fbhgd.png" mode=""></image> -->
						</view>
						<view class="gr" style="display: flex; align-items: center;">
							<view class="grk">
								<block v-if="userInfo != ''">个人</block>
								<block v-if="company != ''">企业</block>
							</view>
							<u-rate class="star" v-model="value" :count="count" :active-color="activeColor" :inaction-color="inactiveColor"
							 :disabled="disabled"></u-rate>
						</view>
					</view>
				</view>
				<view class="gzbtn" @click="addInsertFollow">
					立即关注
				</view>
			</view>
			<image class="bmx" src="../../static/homepage/bmx.png" mode=""></image>
			<view class="header-b">
			</view>
		</view>
		<view class="middle">
			<view class="xxk" style="">
				<zzx-tabs :items="items" :current="current" @clickItem="onClickItem" ref="mytabs">
				</zzx-tabs>
			</view>
			<view class="xxknr" style="">
				<view class="u-m-l-30" v-show="current === 0">
					<block v-if="company != ''">
						<view class="u-flex u-row-between u-border-bottom u-p-10" v-show="isShowCompany('name')">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								企业名称
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								{{company.name}}
							</view>
						</view>
						<view v-show="isShowCompany('industry')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								企业分类
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								{{company.industry}}
							</view>
						</view>
						<view v-show="isShowCompany('type')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								企业性质
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								{{company.type}}
							</view>
						</view>
						
						<view v-show="isShowCompany('qualificationUrl')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								执照
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								<image v-if="company.qualificationUrl" :src="baseUrl + company.qualificationUrl" style="width:185rpx;height:185rpx;" @tap="previewImage(0,[company.qualificationUrl])"></image>
							</view>
						</view>
						
						<view v-show="isShowCompany('address')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								企业地址
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								{{company.address}}
							</view>
						</view>
						<view v-show="isShowCompany('quality')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								质量体系
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								{{company.quality}}
							</view>
						</view>
						<view v-show="isShowCompany('quality')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								质量体系照片
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								<image v-if="item != ''" v-for="(item,index) in qualityUrls" :key="index" :src="baseUrl + item" style="width:185rpx;height:185rpx;"  @tap="previewImage(index,qualityUrls)"></image>
							</view>
						</view>
						
						<view v-show="isShowCompany('specials')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								擅长领域
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								{{company.specials}}
							</view>
						</view>
						
						<view v-show="isShowCompany('scale')" class="u-flex u-row-between u-border-bottom u-p-10">
							<view class=" u-m-b-20 u-m-t-20 xinxi">
								人员规模
							</view>
							<view class="u-flex u-row-start u-m-r-20">
								{{company.scale}}
							</view>
						</view>
					</block>
					<block v-if="userInfo != '' && userInfo != undefined">
					<view class="details" v-show="isShowItme('name')">
						<text class="left">姓名</text>
						<text class="right">{{userInfo.name}}</text>
					</view>
					<view class="details" v-show="isShowItme('sex')">
						<text class="left">性别</text>
						<text class="right">{{userInfo.sex}}</text>
					</view>
					<view class="details" v-show="isShowItme('school')">
						<text class="left">毕业院校</text>
						<text class="right">{{userInfo.school}}</text>
					</view>
					<view class="details" v-show="isShowItme('specialty')">
						<text class="left">产业</text>
						<text class="right">{{userInfo.industry}}</text>
					</view>
					<view class="details" v-show="isShowItme('workingSeniority')">
						<text class="left">工作年限</text>
						<text class="right">{{userInfo.workingSeniority}}</text>
					</view>
					<view class="details" v-show="isShowItme('profession')">
						<text class="left">职称</text>
						<text class="right">{{userInfo.profession}}</text>
					</view>
					<view class="details" v-show="isShowItme('profession')">
						<view  style="position: relative;" v-for="(item,index) in proUrls" :key="index">
							<image style="width: 214upx;height: 214upx;margin-right:30rpx;" :src="baseUrl+item" @tap="previewImage(index,proUrls)" ></image>
						</view>
					</view>
					<view class="details" v-show="isShowItme('credentials')">
						<!-- 没有这个字段 -->
						<text class="left">执业资格</text>
						<text class="right">{{userInfo.credentials}}</text>
					</view>
					<view class="details" v-show="isShowItme('credentials')">
						<view  style="position: relative;" v-for="(item,index) in credentialsUrls" :key="index">
							<image style="width: 214upx;height: 214upx;margin-right:30rpx;" :src="baseUrl+item" @tap="previewImage(index,credentialsUrls)" ></image>
						</view>
					</view>
					<view class="details" v-show="isShowItme('profession')">
						<text class="left">工作单位</text>
						<text class="right">{{userInfo.workUnit}}</text>
					</view>
					<view class="details" v-show="isShowItme('workplace')">
						<text class="left">工作地点</text>
						<text class="right">{{userInfo.workplace}}</text>
					</view>
					<view class="details" v-show="isShowItme('telephone')">
						<text class="left">联系电话</text>
						<text class="right">{{userInfo.telephone}}</text>
					</view>
					<view class="details" v-show="isShowItme('mail')">
						<text class="left">邮箱</text>
						<text class="right">{{userInfo.mail}}</text>
					</view>
					<view class="details" v-show="isShowItme('selfTag')">
						<view class="u-flex">
							<text class="left">自评标签</text>
							<text class="right">{{ userInfo.selfTag }}</text>
							<!-- <view class="tips u-flex">
								<text class="u-m-r-16" v-for="(v, idx) in userInfo.tips" :key="idx">{{ v.selfTag }}</text>
							</view> -->
						</view>

					</view>
					<view class="details" v-show="isShowItme('texts')">
						<text class="left">简介</text>
						<text class="right">{{userInfo.texts}}</text>
					</view>
					</block>
				</view>
				<view v-show="current === 1">
					<!-- <view class="u-m-l-26 u-m-t-35 tuandui">
						<image src="../../static/homepage/cytd.png" mode=""></image>
						<text class="cytd">参与团队</text>
						<text class="gs">{{26}}个</text>
					</view>
					<view class="teamName">
						<view v-for="(item,index) in teamNames" :key="index" class="tdbk" :style="{ backgroundImage: 'url(' + tdbk + ')' }">
							<text>{{item.name}}</text>
						</view>
					</view> -->
					<view class="teamName1">
						<view @click="details(item)" v-for="(item,index) in groups" :key="index" class="tdbk" :style="{ backgroundImage: 'url(' + bjxm + ')' }">
							<text class="sgz u-flex u-line-1 u-row-center u-m-l-5 u-m-r-5" :class="{'on':chooseTeamId == item.id}">{{item.name}}</text>
						</view>
					</view>
					<block v-if="teamdetails != ''">
					<u-gap :bg-color="bgColor" :height="height" :margin-top="marginTop" :margin-bottom="marginBottom"></u-gap>
					<view class="sx">
						<view class="photo" v-if="teamdetails.demand && teamdetails.demand.remarks">
							{{teamdetails.demand.remarks}}
						</view>
						<view class="u-font-30 u-m-t-30" >
							团队编号+番号
						</view>
						<view class="fh u-m-t-20 u-flex u-row-center">
							<text>{{teamdetails.code}}</text>
						</view>
					</view>
					</block>
					<block v-if="teamUserDetail">
					<view class="u-m-30 u-m-t-45" v-if="teamUserDetail && teamUserDetail.cardName != undefined">
						<view class="u-flex u-row-between u-font-30  u-m-r-20">
							<text style="width:200rpx;">姓名</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.cardName}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">毕业院校</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.school}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">所属专业</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.specialty}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">工作年限</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.workingSeniority}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">擅长领域</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.specialty}}</text>
						</view>
					</view>
					<view class="u-m-t-45" v-if="teamUserDetail && teamUserDetail.name != undefined">
						<view class="u-flex u-row-between u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业名称</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.name}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业地址</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.address}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业性质</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.type}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业规模</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.scale}}人</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业资质</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.enterpriseQualification}}</text>
						</view>
					</view>
					<view class="u-flex u-row-around" v-if="teamUserDetail != ''">
						<view class="">
							<u-button class="buttonTwo" @click="myHome(teamUserDetail.userId)">查看详情</u-button>
						</view>
						<view class="">
							<u-button style="background-color: #6ADE7E;" class="buttonTwo" @click="submit">查看档期</u-button>
						</view>
					</view>
					</block>
					<u-gap :bg-color="bgColor" :height="height" :margin-top="marginTop" ></u-gap>
					<view class="teamName1 u-m-b-35" v-if="teamUser.length > 0">
						<view @click="getuser(item)" v-for="(item,index) in teamUser" :key="index" class="tdbk u-flex u-line-1" :style="{ backgroundImage: 'url(' + bjxm + ')' }">
							<text class="dy">{{item.name}}</text>
						</view>
					</view>
				</view>
				<view v-show="current === 2">
					<view class="teamName1">
						<view @click="details(item)" v-for="(item,index) in groups" :key="index" class="tdbk" :style="{ backgroundImage: 'url(' + bjxm + ')' }">
							<text class="sgz u-flex u-line-1 u-row-center u-m-l-5 u-m-r-5" :class="{'on':chooseTeamId == item.id}">{{item.name}}</text>
						</view>
					</view>
					<block v-if="teamdetails != ''">
					<u-gap :bg-color="bgColor" :height="height" :margin-top="marginTop" :margin-bottom="marginBottom"></u-gap>
					<view class="sx">
						<view class="photo" v-if="teamdetails.demand && teamdetails.demand.remarks">
							{{teamdetails.demand.remarks}}
						</view>
						<view class="u-font-30 u-m-t-30" >
							智汇N+1编号+番号
						</view>
						<view class="fh u-m-t-20 u-flex u-row-center">
							<text>{{teamdetails.code}}</text>
						</view>
					</view>
					</block>
					<block v-if="teamUserDetail">
					<view class="u-m-t-45" v-if="teamUserDetail && teamUserDetail.cardName != undefined">
						<view class="u-flex u-row-between u-font-30  u-m-r-20">
							<text style="width:200rpx;">姓名</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.cardName}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">毕业院校</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.school}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">所属专业</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.specialty}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">工作年限</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.workingSeniority}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">擅长领域</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.specialty}}</text>
						</view>
					</view>
					<view class="u-m-t-45" v-if="teamUserDetail && teamUserDetail.name != undefined">
						<view class="u-flex u-row-between u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业名称</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.name}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业地址</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.address}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业性质</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.type}}</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业规模</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.scale}}人</text>
						</view>
						<view class="u-flex u-row-between u-m-t-40 u-font-30  u-m-r-20">
							<text style="width:200rpx;">企业资质</text>
							<text style="color: #9EA2B0;">{{teamUserDetail.enterpriseQualification}}</text>
						</view>
					</view>
					<u-button class="button"  @click="myHome(teamUserDetail.userId)">查看详情</u-button>
					</block>
					<u-gap :bg-color="bgColor" :height="height" :margin-top="marginTop" ></u-gap>
					<view class="teamName1 u-m-b-35" v-if="teamUser.length > 0">
						<view @click="getuser(item)" v-for="(item,index) in teamUser" :key="index" class="tdbk u-flex u-line-1" :style="{ backgroundImage: 'url(' + bjxm + ')' }">
							<text class="dy">{{item.name}}</text>
						</view>
					</view>
				</view>
				<view v-show="current === 3">
					<view class="u-flex u-row-around u-m-t-30 u-p-b-30 u-border-bottom" v-if="productsList.length > 0">
						<view class="xmkk u-row-center" v-for="(item,index) in productsList" :key="index" :style="{ backgroundImage: 'url(' + tdmckk + ')' }"
						 :class="index == showIndex?'on':''" @click="showProduct(index)">
							<view class="u-line-2">{{item.cate}}</view>
						</view>
					</view>
					<view class="u-p-30">
						<view style="width:100%;" class="u-border-bottom u-p-t-20 u-p-b-30"  v-for="(item,index) in products" :key="index">
							<view class="u-p-10">{{item.content}}</view>
							<view class="u-flex">
								<image mode="aspectFill" v-for="(v,i) in getImgs(item.imgUrl)" :key="i" @tap="previewImage(i,getImgs(item.imgUrl))" style="width:185rpx;height:185rpx;margin-right:30rpx;margin-top:10rpx;" :src="baseUrl+v"></image>
							</view>
						</view>
					</view>
					<!-- <view class="yeji">
						<view v-for="(item,index) in achievement" :key="index" class="yjxq">
							<view class="yjxq-t">
								<image src="../../static/homepage/xm.png" mode=""></image>
								<text>项目{{item.userId}}</text>
							</view>
							<view class="yjxj">
								<text class="left">项目名称</text>
								<text class="right">{{item.name}}</text>
							</view>
							<view class="yjxj-t">
								<text class="left">类型</text>
								<text class="right">{{item.type}}</text>
							</view>
							<view class="yjxj-t">
								<text class="left">阶段</text>
								<text class="right">{{item.stage}}</text>
							</view>
							<view class="yjxj-t">
								<text class="left">规模</text>
								<text class="right">{{item.scale}}</text>
							</view>
							<view class="yjxj-t">
								<text class="left">时间</text>
								<text class="right">{{item.startTime}}-{{item.endTime}}</text>
							</view>
							<view class="yjxj-t">
								<text class="left">项目地点</text>
								<text class="right">{{item.area}}</text>
							</view>
							<view class="yjxj-t">
								<text class="left">本身作用</text>
								<text class="right">{{item.partake==0?'主导':'参与'}}</text>
							</view>
							<view class="gap">

							</view>
						</view>
					</view> -->
				</view>
				<view v-show="current === 4">
					<view class="zhgd">
						<text @click="qb()" :class="[currentTab == 0 ? 'qb' : '']">全部</text>
						<text @click="hp()" :class="[currentTab == 1 ? 'qb' : '']">好评</text>
						<text @click="cp()" :class="[currentTab == 2 ? 'qb' : '']">差评</text>
					</view>
					<view class="f-list u-flex u-m-b-20 u-m-t-28" v-for="(item, index) in evaluations" :key="index">
						<view class="qylg" :style="{ backgroundImage: 'url(' + (item.userLogo? baseUrl + item.userLogo:defaultLogo) + ')' }">
							<image :src="logoMask"></image>
						</view>
						<view class="f-item u-m-l-32">
							<view class="title u-m-t-12">{{ item.userName }}</view>
							<view class="syxx">
								<!-- <image class="xx"  src="../../static/homepage/sxxx.png" mode=""></image>
								<image class="xx"  src="../../static/homepage/sxxx.png" mode=""></image>
								<image class="xx"  src="../../static/homepage/sxxx.png" mode=""></image>
								<image class="xx"  src="../../static/homepage/sxxx.png" mode=""></image>
								<image class="xx"  src="../../static/homepage/kxxx.png" mode=""></image> -->
								<u-rate class="star" v-model="item.score" :count="count" :active-color="activeColor" :inaction-color="inactiveColor"
								 :disabled="disabled"></u-rate>
								<text class="time">{{item.createTime}}</text>
							</view>
							<view class="explain u-m-t-25">{{ item.comment }}</view>
						</view>

					</view>
				</view>
			</view>
		</view>
		<view style="height:110rpx;"></view>
		<view class="bottom">
			<view class="zx">
			</view>
			<button @click="msg(user.id)" class="gtbtn">立即沟通</button>
		</view>
		<view class="h100"></view>
	</view>
</template>

<script>
	import zzxTabs from "@/components/zzx-tabs/zzx-tabs.vue"
	export default {
		components: {
			zzxTabs
		},
		data() {
			return {
				id:0,
				evaluations:[],
				groupN:'',
				chooseTeamId:'',
				chooseItem:'',
				userInfo:'',
				proUrls:[],
				teamUser:[],
				credentialsUrls:[],
				teamUserDetail:'',
				teamUserId:'',
				qualityUrls:[],
				company:'',
				height: 20,
				bgColor: this.$u.color.bgColor,
				marginTop: 30,
				marginBottom: 30,
				activeColor: '#FF9900',
				inactiveColor: '#FFE2CF',
				disabled: true,
				count: 5,
				value: 4,
				items: ['详情', '团队', '智汇N+1', '业绩', '智汇观点'],
				current: 0,
				currentTab: 0,
				date: new Date().toISOString().slice(0, 10),
				bjxm: "../../static/homepage/xmkk.png",
				tdbk: "../../static/homepage/tdmckk.png",
				userDetail: {},
				groups: [],
				achievement: [],
				list: [],
				teamdetails:'',
				nUserDetail:[],
				teams:[],
				njys:[],
				njycoms:[],
				reqBody: {
					// pageNum:1,
					// pageSize:10
					id: 29,
					identityType:0
				},
				reqBodyyeji: {
					pageNum:1,
					pageSize:10,
				},
				reqBodytuandui:{},
				user:{name:'',imgUrl:''},
				baseUrl:this.$mConfig.baseUrl,				
				logoMask: this.$mAssetsPath.logoMask,
				defaultLogo: this.$mAssetsPath.defaultLogo,		
				showIndex: 0,		
				productsList: [],
				products:[],
				tdmckk: this.$mAssetsPath.tdmckk,
				evBody: {
					index:10,
					size:1
				}
			};
		},
		onLoad(options){
			if(options.id){
				this.id = options.id;
			}else{
				this.id = this.$store.state.userInfo.id
			}
		},
		onShow() {
			this.initPage();
		},
		methods: {		
			async addInsertFollow(){
				let reqBody = {
					"noticedId": this.user.id  //被关注人ID
				};
				let result = await this.$apis.insertFollow(reqBody);
				if(result.code == 200){
					uni.showToast({
						title:'关注成功'
					})
				}
			},
			async msg(id){
				let result = await this.$apis.addTmpChat({id:id});
				
				uni.setStorageSync('tmpMsgId', id);
				uni.setStorageSync('msgType', 999);
				uni.switchTab({
					url:"../tabBar/message"
				})
			},
			previewImage(index,files) { //预览图片
				let imgs = files;					
				let urls = [];
				for(var i in imgs){
					urls.push(this.baseUrl + imgs[i]);
				}
				console.log(urls);
				uni.previewImage({
					current:index,
					urls: urls
				});
			},
			async myHome(id){
				this.$mRouter.push({
					route:this.$mRoutesConfig.releaseNumber,
					query:{
						id:id
					}
				});
			},
			isShowCompany(field){
				if(this.company != '' && this.company.customize != undefined){
					if(this.company.customize.indexOf(field) === -1){
						return false;
					}else{
						return true;
					}
				}else{
					return true;
				}
			},
			isShowItme(field){
				if(this.userInfo.customize != null && this.userInfo.customize.indexOf(field) === -1){
					return false;
				}else{
					return true;
				}
			},
			//详情
			async initPage() {
				let result = await this.$apis.userHome({userId:this.id});
				if(result.data.company != undefined){
					
					this.company =  result.data.company;
					this.user.imgUrl = result.data.company.imgUrl != null ? this.baseUrl + result.data.company.imgUrl:this.defaultLogo;								
					uni.setNavigationBarTitle({
					　　title:"企业主页"
					})
					
					this.user.id = result.data.company.userId;
					this.user.name = result.data.company.name;
					console.log("name",this.user.name);
										
					if (this.company.qualityUrl.indexOf(',') === -1) {
						this.qualityUrls = [this.company.qualityUrl];
					} else {
						
						this.qualityUrls = this.company.qualityUrl.split(',');
					}
				}
				if(result.data.userInfo != undefined){
					
					uni.setNavigationBarTitle({
					　　title:"个人主页"
					})
					this.user.id = result.data.userInfo.userId;
					this.userInfo = result.data.userInfo;
					this.user.imgUrl = result.data.userInfo.imgUrl != null ? this.baseUrl + result.data.userInfo.imgUrl:this.defaultLogo;				
					this.user.name = this.userInfo.cardName;
					if(this.userInfo.proUrl != '' && this.userInfo.proUrl != null){
						this.proUrls = (this.userInfo.proUrl.indexOf(',') === -1)?this.userInfo.proUrl.split(','):[this.userInfo.proUrl];
					}
					if(this.userInfo.credentialsUrl != '' && this.userInfo.credentialsUrl != null){	
						this.credentialsUrls = (this.userInfo.credentialsUrl.indexOf(',') === -1)?this.userInfo.credentialsUrl.split(','):[this.userInfo.credentialsUrl];
					}
				}
				
				//业绩
				if (result.data.productsList != undefined) this.productsList = result.data.productsList;
				if (this.productsList.length > 0) {
					if (this.productsList[0].productsList.length > 0) this.products = this.productsList[0].productsList;							
				}
				
				this.evaluation(); //智汇观点
				
			},		
			async evaluation(){
				this.evBody.userId=this.id;
				let {data} = await this.$apis.evaluation(this.evBody);
				if( data  && data.pages  != undefined ) this.evaluations = data.pages.content;
			},
			async getuserJoinGroup(type){
				let reqbody = {userId:this.id}
				if(type == 1 || type == 2){
					reqbody.type = type;
					let result = await this.$apis.userJoinGroup(reqbody);
					this.groups = result.data;			
					if(result.data.length > 0){						
						this.details(result.data[0]);
					}
				}
			},
			showProduct(index) {
				this.showIndex = index;
				this.products = this.productsList.length > 0 ? this.productsList[index].productsList : [];
			},
			getImgs(imgs) {
				var imgList = [];
				if (imgs.indexOf(',') === -1) {
					imgList = [imgs];
				} else {
					imgList = imgs.split(',');
				}
				return imgList;
			},
			//团队详情
			async details(item){
				this.teamUserDetail = '';
				var id = item.id;
				this.chooseItem = item;
				this.getfindTeamById(id);
				this.chooseTeamId = id;
				this.getTeamUsers(id);
			},
			async getTeamUsers(id){
				let result = await this.$apis.fetchGroupPerson({id:id,type:this.current});		
				this.teamUser = result.data;
			},
			async getfindTeamById(id){
				let result = await this.$apis.findTeamById({id:id});
				this.teamdetails = result.data;
				
				if(result.data.length > 0) this.getuser(result.data[0]);
			},
			//团员详情
			async getuser(item){
				this.reqBodytuandui['id'] = item.id;
				this.reqBodytuandui['type'] = item.userType;
				let result = await this.$apis.otherUserInfo(this.reqBodytuandui);
				this.teamUserDetail = result.data.company?result.data.company:result.data.userInfo;
			
			},
			async onClickItem(e) {		
				if (this.current !== e.currentIndex) {
					this.current = e.currentIndex;
					this.teamUser = '';
					this.groups = [];
					this.teamUserDetail = '';
					this.teamdetails = '';
					this.getuserJoinGroup(e.currentIndex);	
				}
			},
			qb() {
				this.currentTab = 0;
			},
			hp() {
				this.currentTab = 1;
			},
			cp() {
				this.currentTab = 2;
			}
		}
	}
</script>

<style scoped lang="scss">
	.h100 {height:100rpx;}
	.f-logo {
		width: 102rpx;
		height: 118rpx;		
		margin-left: 28rpx;
		margin-top:20rpx;
		display: flex;
		text-align: center;
		align-items: center;
		justify-content: center;
		background-size: auto 100%;
		background-position: center center;
		background-repeat: no-repeat;
		overflow: hidden;
		image {
			width: 102rpx;
			height: 118rpx;
		}
	}
	.status_bar {
		height: var(--status-bar-height);
		width: 100%;
	}

	.top_view {
		height: var(--status-bar-height);
		width: 100%;
		position: fixed;
		top: 0;
		z-index: 999;
	}

	.container {
		width: 100%;
	}

	// .header {
	//   position: fixed;
	//   top: 88rpx;
	//   left: 0;
	//   z-index: 99;
	//   width:100%;
	//   height:82rpx;
	// }
	.header-t {
		padding: 36rpx 30rpx 28rpx 22rpx;
		display: flex;
		justify-content: space-between;
		color: #0D1D36;
		font-size: 32rpx;
		font-weight: 500;

		image {
			width: 48rpx;
			height: 48rpx;
		}

	}

	.henxian {
		width: 750rpx;
		height: 20rpx;
		background-color: #F5F5F9;
	}

	.header-m {
		display: flex;
		align-items: center;
		.xmkk {
			margin-left: 28rpx;
			margin-top:20rpx;
			text {
				color: #888D99;
				font-size: 26rpx;
				line-height: 118rpx;
				margin-left: 27rpx;
			}
		}

		.xm {
			margin-top: 33rpx;

			.mz {
				font-size: 30rpx;
				color: #0D1D36;
				font-weight: 600;
			}

			.fbh {
				margin-left: 20rpx;
				font-size: 26rpx;
				color: #AB61FF;
			}

			.fbhtp {
				margin-left: 8rpx;
				width: 14rpx;
				height: 22rpx;
			}
		}

		.gr {
			display: flex;
			margin-top: 15rpx;

			.grk {
				width: 72rpx;
				height: 38rpx;
				border: 1rpx solid #FF9900;
				border-radius: 6rpx;
				font-size: 24rpx;
				color: #FF9900;
				text-align: center;
			}

			.star {
				color: #ff3300;
			}

			.syxx {
				margin-left: 19rpx;
			}

			.xx {
				width: 24rpx;
				height: 24rpx;
				margin-left: 7rpx;
			}
		}

		.gzbtn {
			margin-top: 49rpx;
			margin-right: 15rpx;
			width: 153rpx;
			height: 58rpx;
			border: 2rpx solid #AB61FF;
			border-radius: 29rpx;
			color: #AB61FF;
			font-size: 26rpx;
			text-align: center;
			line-height: 58rpx;
		}

	}

	.bmx {
		margin-top: 26rpx;
		width: 100%;
		height: 6rpx;
	}

	.header-b {
		// margin-top: 26rpx;
		width: 750rpx;
		height: 20rpx;
		background-color: #F5F5F9;
	}

	.xxk {
		margin-top: 20upx;
		border-width: 0 0 1rpx 0;
		border-style: solid;
		border-color: #DADFED;
	}

	.xxknr {
		margin-top: 20upx;
		color: #0D1D36;

		// font-size: 24upx;
		// height: 260upx;
		.details {
			margin-top: 41rpx;

			.left {
				color: #888E9A;
				font-size: 30rpx;

			}

			.right {
				position: absolute;
				color: #0E1E36;
				font-size: 30rpx;
				left: 216rpx;
				font-weight: 600;
			}

			.tips {
				margin-left: 69rpx;

				text {
					// margin-left: 24rpx;
					width: 129rpx;
					height: 42rpx;
					font-size: 26rpx;
					color: #4C9CFF;
					background: #EDF5FF;
					text-align: center;
					line-height: 42rpx;
				}
			}

		}
	}

	.bottom {
		position: fixed;
		z-index:2;
		bottom:0;
		width: 100%;
		background-color: #fff;
		border-top: 1rpx solid #DADFED;
		display: flex;
		justify-content: center;
		align-items: center;
		height:110rpx;
		.gtbtn {
			width: 662rpx;
			height: 80rpx;
			text-align: center;
			color: #fff;
			font-size: 32rpx;
			background: #ab61ff;
			border-radius: 40rpx;
		}
	}

	.tuandui {
		display: flex;
		align-items: center;

		image {
			width: 48rpx;
			height: 48rpx;
		}

		text {
			color: #4C9CFF;
			font-size: 34rpx;
			font-weight: 600;
		}

		.cytd {
			margin-left: 13rpx;
		}

		.gs {
			margin-left: 33rpx;
		}
	}

	.teamName {
		display: flex;
		flex-wrap: wrap;

		.tdbk {
			position: relative;
			width: 143rpx;
			height: 167rpx;
			overflow: hidden;
			background-size: 100% auto;
			background-position: 0 bottom;
			margin-left: 35rpx;
			margin-top: 35rpx;
			display: flex;
			justify-content: center;

			text {
				color: #888D99;
				font-size: 28.19rpx;
				line-height: 165rpx;
				margin-left: 19rpx;
			}
		}
	}

	.yjxq-t {
		display: flex;
		align-items: center;
		margin-left: 20rpx;
		margin-top: 45rpx;

		image {
			width: 48rpx;
			height: 48rpx;
		}

		text {
			font-size: 34rpx;
			color: #4C9CFF;
			font-weight: 600;
		}
	}

	.yjxj {
		padding-left: 28rpx;
		margin-top: 40rpx;
		width: 100%;
		height: 59rpx;
		background-color: #F1F7FF;
		line-height: 59rpx;

		.left {
			font-size: 30rpx;
			color: #888E9A;
		}

		.right {
			position: absolute;
			left: 216rpx;
			color: #0E1E36;
			font-size: 30rpx;
		}
	}

	.yjxj-t {
		padding-left: 28rpx;
		margin-top: 31rpx;

		.left {
			font-size: 30rpx;
			color: #888E9A;
		}

		.right {
			position: absolute;
			left: 216rpx;
			color: #0E1E36;
			font-size: 30rpx;
		}
	}

	.gap {
		width: 100%;
		height: 20rpx;
		background-color: #F5F5F9;
		margin-top: 39rpx;
	}

	.zhgd {
		margin-top: -20rpx;
		width: 100%;
		height: 84rpx;
		background-color: #F5F5F9;
		display: flex;
		justify-content: space-around;
		line-height: 84rpx;
		font-size: 28rpx;
		color: #4C9CFF;
	}

	.qb {
		width: 152rpx;
		height: 54rpx;
		text-align: center;
		line-height: 54rpx;
		background-color: #FF9A00;
		margin-top: 16rpx;
		color: #ffffff;
		border-radius: 27rpx;
	}

	// 智汇观点
	.qylg {
		display: flex;
		width: 102rpx;
		height: 118rpx;
		background-size: 100% auto;
		background-position: 0 bottom;
		margin-left: 28rpx;
		margin-top: 15rpx;		
		
		image {
			color: #888D99;
			font-size: 26rpx;
			
				width: 102rpx;
				height: 118rpx;
		}
	}

	.xx {
		width: 24rpx;
		height: 24rpx;
	}

	.time {
		color: #888E9A;
		font-size: 26rpx;
		margin-left: 225rpx;
	}

	.title {
		color: #0E1E36;
		font-size: 30rpx;
		font-weight: bold;
	}

	.explain {
		color: #888E9A;
		font-size: 28rpx;
	}

	.f-list {
		padding: 0 0 28rpx 0;
		border-width: 0 0 1rpx 0;
		border-style: solid;
		border-color: #DADFED;
	}
	.teamName1{
		display: flex;
		flex-wrap: wrap;
		// margin-top: 15rpx;
		// margin-left: -8rpx;
		padding: 30rpx;
		// border: 1px solid;
		
		// margin: 0 auto;
		.tdbk{
			position: relative;
			overflow: hidden;
			width: 120rpx;
			height: 137rpx;
			margin-right: 15rpx;
			margin-bottom: 15rpx;
			background-size: 100% auto;
			background-position: 0 0;
			display: flex;
			justify-content: center;
			
			text {width:90%;margin:0 auto;text-align:center;overflow: hidden;}
			.on {color: #ab61ff;}
			
		}
	}
		.name{
			font-size: 30rpx;
			color: #0D1D36;
			font-weight: bold;
		}
		// .explain{
		// 	width: 397rpx;
		// 	height: 39rpx;
		// 	background-color: #DADFED;
		// 	text-align: center;
		// 	line-height: 39rpx;
		// 	.qrsj{
		// 		font-size: 26rpx;
		// 		color: #4B9CFF;
		// 	}
		// 	.time{
		// 		font-size: 26rpx;
		// 		color: #9DA2B0;
		// 	}
		// }
		.wqr{
			width: 100rpx;
			height: 39rpx;
			background-color: #FFF5E8;
			text-align: center;
			line-height: 39rpx;
			.wqrsm{
				color: #FF9E21;
				font-size: 26rpx;
			}
		}
		.sx{
			display: flex;
			flex-direction: column;
			align-items: center;
			.photo{
				width: 595rpx;
				padding:20rpx;
				border-radius: 10rpx;
				background-color: #F5F5F9;
			}
			.fh{
				width: 340rpx;
				height: 48rpx;
				background: #E8F2FF;
				border-radius: 4rpx;
				text{
					color: #4C9CFF;
					font-size: 30rpx;
					margin-left: 30rpx;
					line-height: 48rpx;
				}
			}
		}
		.button {
			width: 662rpx;
			margin:60rpx auto 30rpx auto;
			background: #4C9CFF;
			border-radius: 40rpx;
			border: 0;
			color: #fff;
			&.u-hairline-border:after {
				border: 0;
			}
		}
		.buttonTwo {
			width: 310rpx;
			margin:60rpx auto 30rpx auto;
			background: #4C9CFF;
			border-radius: 40rpx;
			border: 0;
			color: #fff;
			&.u-hairline-border:after {
				border: 0;
			}
		}
		.dy{
			color: #888D99;
			font-size: 26rpx;
		}
		.sgz{
			color: #888D99;
			font-size: 22rpx;			
			line-height: 130rpx;
			white-space: nowrap;
		}
		.xinxi {width:200rpx;}
		
		.xmkk {
			display: flex;
			align-items: center;
			width: 107rpx;
			height: 124rpx;
			text-align: center;
			background-repeat: no-repeat;
			background-size: 100% auto;
			background-position: 0 bottom;
			color: #0D1D36;
		
			&.on {
				color: #F0AD4E;
				font-weight: 800;
			}
		
			text {
				width: 70rpx;
				height: 70rpx;
				display: block;
				font-size: 24rpx;
			}
		}
</style>
